package com.sc.ktapplication.common.net.okdown;

import okhttp3.Request;
import okhttp3.Request.Builder;

public class OkHttpRequest {
    protected String url;
    protected int id;
    protected Builder builder = new Builder();

    protected OkHttpRequest(String url)  {
        this.url = url;
        this.initBuilder();
    }

    private void initBuilder() {
        this.builder.url(this.url);
    }

    protected Request buildRequest() {
        return this.builder.get().build();
    }

    public RequestCall build() {
        return new RequestCall(this);
    }

    public Request generateRequest() {
        return this.buildRequest();
    }

    public int getId() {
        return this.id;
    }
}

